<template>
  <div>
    这是父组件num:{{ num1 }}
    <hr>
    <br>
    这是父组件num:{{ num2 }}
    <hr>
    <br>
    <!--v-model的写法  -->
    <!-- <Son v-model="num" /> -->

    <!-- sync的原理 -->
    <Son
      :num1.sync="num1"
      :num2.sync="num2"
      @update:abc="val=>num1=val"
      @update:cde="val=>num2=val"
    />
    <!-- 等同于如下写法 -->
    <!-- <Son :abc="num1" @update:abc="val=>num1=val" /> -->
  </div>
</template>

<script>
import Son from './Son.vue'
export default {
  components: {
    Son
  },
  data() {
    return {
      num1: 100,
      num2: 200
    }
  },
  methods: {
  }
}

</script>

<style>

</style>
